<!-- 车辆详情 -->
<template>
  <div class="dashboard-container vehicle-detail">
    <el-tabs
      v-model="activeName"
      class="aside-box"
      @tab-click="handleClick"
    >
      <el-tab-pane
        label="基本信息"
        name="first"
      >
      </el-tab-pane>
      <vehicleInfoVue :id="cid"></vehicleInfoVue>
      <el-tab-pane
        label="行驶证信息"
        name="second"
      >
        <driverLicenseVue :id="id"></driverLicenseVue>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import driverLicenseVue from './components/driver-license.vue'
import vehicleInfoVue from './components/vehicle-info.vue'
export default {
  components: {
    driverLicenseVue, vehicleInfoVue
  },
  data() {
    return {
      activeName: 'first',
      id: null
    }
  },
  created() {
    this.id = this.$route.params.id
    console.log(this.id)
  },
  methods: {
    // 切换
    handleClick(tab, event) {
      console.log(tab, event)
    }
  }
}
</script>

<style lang="scss" scoped>
.active {
  color: #ff643d;
}
</style>

<style lang="scss" scoped>
.vehicle-detail {
  ::v-deep .el-container{
    flex-direction: column;
    margin-left: 0px;

  }
  .in{
    height: calc(100vh - 205px);
    // height: 100%;
  }
  .aside-box {
    margin: 20px;
    background: #ffffff;
    border-radius: 4px;
    // width: 150px;
    padding: 24px 37px 24px 37px;
    box-sizing: border-box;

    // min-height: calc(100vh - 50px);
    ::v-deep .el-aside {
      padding-bottom: 14px;
      width: 100%!important;
      display: flex;
      background-color: #ffffff;
      border-bottom:1px solid #E5E7EC ;
      text-align: left;
      font-size: 14px;
      .aside-item {
        // margin-top: 38px;
        cursor: pointer;
        &:first-child {
          margin-right: 53px;
          padding-left: 25px;

        }
      }
      .aside-item.active{
        font-size: 16px;
        font-weight: bold;
        color: #20232A;
        &:after{
          content: '';
          display: block;
          background-color:#E15536 ;
          height: 3px;
          width: 49px;
          margin: 0 auto;
          position: relative;
          top: 14px;
        }
      }
    }
  }
}
</style>
